﻿#ifndef MESSAGESERVICE_H
#define MESSAGESERVICE_H

#include <QObject>
#include "message.h"
#include "messagenetworkaccessmanager.h"
#include <QPushButton>

class MessageService : public QObject
{
    Q_OBJECT
public:
    explicit MessageService(QObject *parent = nullptr);

    void getMessages(QWidget *widget);

    void getImportMessage(
            QWidget *widget,
            QPushButton *button,
            int ticketAdjustType,
            int type);
signals:
    void getMessagesSuccess(QList<Message*> messages);

    void getImportMessagesSuccess(QList<Message*> messages);

public slots:

private:
    MessageNetworkAccessManager *manager;
};

#endif // MESSAGESERVICE_H
